/*
    门禁组管理
 */

import request from '@/router/axios'

//门禁组的展示和查找
export function doorList(obj) {
    return request({
        url: '/campus/accesscontrolgroup/page',
        method: 'get',
        params: obj
    })
}
//门禁组的新增
export function addDoor(obj) {
    return request({
        url: '/campus/accesscontrolgroup',
        method: 'post',
        data: obj
    })
}
// //根据id查询 门禁组
// export function searchDoor(id) {
//     return request({
//         url: '/campus/accesscontrolgroup/' + id,
//         method: 'get',
//         params: id
//     })
// }
//门禁组的修改
export function editDoor(obj) {
    return request({
        url: '/campus/accesscontrolgroup',
        method: 'put',
        data: obj
    })
}
//门禁组的删除
export function delDoor(id) {
    return request({
        url: '/campus/accesscontrolgroup/' + id,
        method: 'delete',
    })
}


//编辑的展示和查找
export function equipListDoor(obj) {
    return request({
        url: '/campus/accesscontrolgroup/DeviceGroupConnect/page',
        method: 'get',
        params:obj
    })
}

//编辑的修改
export function editEquipDoor(obj) {
    return request({
        url: '/campus/accesscontrolgroup/DeviceGroupConnect',
        method: 'put',
        data: obj
    })
}


//编辑的解绑
export function clearEquipDoor(obj) {
    return request({
        url: '/campus/accesscontrolgroup/DeviceGroupConnect/clear',
        method: 'delete',
        params: obj
    })
}

//获取所有门禁组数据
export function unEquipList(obj) {
    return request({
        url: '/campus/accesscontrolgroup/get/unboundDevice',
        method: 'get',
        params: obj
    })
}

